package com.ruoyi.assemble.common.utils;

/**
 * @author yuqh
 * @time 2022/8/4 10:54
 * @descrition 功能描述:
 */
public class SystemInfoUtils {
    public static final String WINDOWS = "windows";
    public static final String LINUX = "linux";
    public static String getSystemOS(){
        String os = System.getProperty("os.name");
        //Windows操作系统
        if (os != null && os.toLowerCase().startsWith(WINDOWS)) {
            return "windows";
        //Linux操作系统
        } else if (os != null && os.toLowerCase().startsWith(LINUX)) {
            return "linux";
        } else { //其它操作系统
            return "other";
        }
    }
}
